package com.dt.platform.domain.hr;

import com.github.foxnic.dao.entity.Entity;
import io.swagger.annotations.ApiModel;
import javax.persistence.Table;
import com.github.foxnic.sql.meta.DBTable;
import com.dt.platform.constants.db.HrTables.HR_PERSON_LEAVE_ACT;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.Transient;
import com.github.foxnic.api.swagger.EnumFor;
import javax.persistence.Id;
import org.github.foxnic.web.domain.hrm.Employee;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.foxnic.commons.lang.DataParser;
import java.util.Map;
import com.github.foxnic.dao.entity.EntityContext;
import com.dt.platform.domain.hr.meta.PersonLeaveActMeta;
import com.github.foxnic.sql.data.ExprRcd;



/**
 * 员工离职记录
 * <p>员工离职记录 , 数据表 hr_person_leave_act 的PO类型</p>
 * @author 金杰 , maillank@qq.com
 * @since 2024-08-31 22:52:25
 * @sign 1689FE6D59744630B639B70904BF3C23
 * 此文件由工具自动生成，请勿修改。若表结构或配置发生变动，请使用工具重新生成。
*/

@Table(name = "hr_person_leave_act")
@ApiModel(description = "员工离职记录 ; 员工离职记录 , 数据表 hr_person_leave_act 的PO类型")
public class PersonLeaveAct extends Entity {

	private static final long serialVersionUID = 1L;

	public static final DBTable TABLE =HR_PERSON_LEAVE_ACT.$TABLE;
	
	/**
	 * 原因：原因
	*/
	@ApiModelProperty(required = false,value="原因" , notes = "原因" , example = "121")
	private String content;
	
	/**
	 * 创建人ID：创建人ID
	*/
	@ApiModelProperty(required = false,value="创建人ID" , notes = "创建人ID" , example = "110588348101165911")
	private String createBy;
	
	/**
	 * 创建时间：创建时间
	*/
	@ApiModelProperty(required = false,value="创建时间" , notes = "创建时间" , example = "2024-08-31 10:17:34")
	private Date createTime;
	
	/**
	 * 删除人ID：删除人ID
	*/
	@ApiModelProperty(required = false,value="删除人ID" , notes = "删除人ID")
	private String deleteBy;
	
	/**
	 * 删除时间：删除时间
	*/
	@ApiModelProperty(required = false,value="删除时间" , notes = "删除时间")
	private Date deleteTime;
	
	/**
	 * 是否已删除：是否已删除
	*/
	@ApiModelProperty(required = true,value="是否已删除" , notes = "是否已删除" , example = "0")
	private Integer deleted;
	@Transient
	@EnumFor("deleted")
	private Boolean deletedBool;
	
	/**
	 * 审批附件：审批附件
	*/
	@ApiModelProperty(required = false,value="审批附件" , notes = "审批附件")
	private String file1Ids;
	
	/**
	 * 交接附件：交接附件
	*/
	@ApiModelProperty(required = false,value="交接附件" , notes = "交接附件")
	private String file2Ids;
	
	/**
	 * 交接人：交接人
	*/
	@ApiModelProperty(required = false,value="交接人" , notes = "交接人" , example = "617107674672136192")
	private String handoverId;
	
	/**
	 * 主键：主键
	*/
	@Id
	@ApiModelProperty(required = true,value="主键" , notes = "主键" , example = "599509706888708101")
	private String id;
	
	/**
	 * 离职日期：离职日期
	*/
	@ApiModelProperty(required = false,value="离职日期" , notes = "离职日期")
	private Date leaveDate;
	
	/**
	 * 备注：备注
	*/
	@ApiModelProperty(required = false,value="备注" , notes = "备注" , example = "21212")
	private String note;
	
	/**
	 * 经办时间：经办时间
	*/
	@ApiModelProperty(required = false,value="经办时间" , notes = "经办时间")
	private Date operTime;
	
	/**
	 * 经办人：经办人
	*/
	@ApiModelProperty(required = false,value="经办人" , notes = "经办人")
	private String operUserId;
	
	/**
	 * 离职人员：离职人员
	*/
	@ApiModelProperty(required = false,value="离职人员" , notes = "离职人员" , example = "808412974225031168")
	private String personId;
	
	/**
	 * 办理状态：办理状态
	*/
	@ApiModelProperty(required = false,value="办理状态" , notes = "办理状态")
	private String status;
	
	/**
	 * 租户：租户
	*/
	@ApiModelProperty(required = false,value="租户" , notes = "租户" , example = "T001")
	private String tenantId;
	
	/**
	 * 修改人ID：修改人ID
	*/
	@ApiModelProperty(required = false,value="修改人ID" , notes = "修改人ID")
	private String updateBy;
	
	/**
	 * 修改时间：修改时间
	*/
	@ApiModelProperty(required = false,value="修改时间" , notes = "修改时间")
	private Date updateTime;
	
	/**
	 * version：version
	*/
	@ApiModelProperty(required = true,value="version" , notes = "version" , example = "1")
	private Integer version;
	
	/**
	 * person：person
	*/
	@ApiModelProperty(required = false,value="person" , notes = "person")
	private Person person;
	
	/**
	 * handover：handover
	*/
	@ApiModelProperty(required = false,value="handover" , notes = "handover")
	private Employee handover;
	
	/**
	 * oper：oper
	*/
	@ApiModelProperty(required = false,value="oper" , notes = "oper")
	private Employee oper;
	
	/**
	 * 获得 原因<br>
	 * 原因
	 * @return 原因
	*/
	public String getContent() {
		return content;
	}
	
	/**
	 * 设置 原因
	 * @param content 原因
	 * @return 当前对象
	*/
	public PersonLeaveAct setContent(String content) {
		this.content=content;
		return this;
	}
	
	/**
	 * 获得 创建人ID<br>
	 * 创建人ID
	 * @return 创建人ID
	*/
	public String getCreateBy() {
		return createBy;
	}
	
	/**
	 * 设置 创建人ID
	 * @param createBy 创建人ID
	 * @return 当前对象
	*/
	public PersonLeaveAct setCreateBy(String createBy) {
		this.createBy=createBy;
		return this;
	}
	
	/**
	 * 获得 创建时间<br>
	 * 创建时间
	 * @return 创建时间
	*/
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	 * 设置 创建时间
	 * @param createTime 创建时间
	 * @return 当前对象
	*/
	public PersonLeaveAct setCreateTime(Date createTime) {
		this.createTime=createTime;
		return this;
	}
	
	/**
	 * 获得 删除人ID<br>
	 * 删除人ID
	 * @return 删除人ID
	*/
	public String getDeleteBy() {
		return deleteBy;
	}
	
	/**
	 * 设置 删除人ID
	 * @param deleteBy 删除人ID
	 * @return 当前对象
	*/
	public PersonLeaveAct setDeleteBy(String deleteBy) {
		this.deleteBy=deleteBy;
		return this;
	}
	
	/**
	 * 获得 删除时间<br>
	 * 删除时间
	 * @return 删除时间
	*/
	public Date getDeleteTime() {
		return deleteTime;
	}
	
	/**
	 * 设置 删除时间
	 * @param deleteTime 删除时间
	 * @return 当前对象
	*/
	public PersonLeaveAct setDeleteTime(Date deleteTime) {
		this.deleteTime=deleteTime;
		return this;
	}
	
	/**
	 * 获得 是否已删除<br>
	 * 是否已删除
	 * @return 是否已删除
	*/
	public Integer getDeleted() {
		return deleted;
	}
	
	/**
	 * 获得 是否已删除 的投影属性<br>
	 * 等价于 getDeleted 方法，获得对应的枚举类型
	 * @return 是否已删除
	*/
	@Transient
	public Boolean isDeleted() {
		if(this.deletedBool==null) {
			this.deletedBool=DataParser.parseBoolean(deleted);
		}
		return this.deletedBool ;
	}
	
	/**
	 * 设置 是否已删除
	 * @param deleted 是否已删除
	 * @return 当前对象
	*/
	@JsonProperty("deleted")
	public PersonLeaveAct setDeleted(Integer deleted) {
		this.deleted=deleted;
		this.deletedBool=DataParser.parseBoolean(deleted);
		return this;
	}
	
	/**
	 * 设置 是否已删除的投影属性，等同于设置 是否已删除
	 * @param deletedBool 是否已删除
	 * @return 当前对象
	*/
	@Transient
	public PersonLeaveAct setDeleted(Boolean deletedBool) {
		if(deletedBool==null) {
			this.deleted=null;
		} else {
			this.deleted=deletedBool?1:0;
		}
		this.deletedBool=deletedBool;
		return this;
	}
	
	/**
	 * 获得 审批附件<br>
	 * 审批附件
	 * @return 审批附件
	*/
	public String getFile1Ids() {
		return file1Ids;
	}
	
	/**
	 * 设置 审批附件
	 * @param file1Ids 审批附件
	 * @return 当前对象
	*/
	public PersonLeaveAct setFile1Ids(String file1Ids) {
		this.file1Ids=file1Ids;
		return this;
	}
	
	/**
	 * 获得 交接附件<br>
	 * 交接附件
	 * @return 交接附件
	*/
	public String getFile2Ids() {
		return file2Ids;
	}
	
	/**
	 * 设置 交接附件
	 * @param file2Ids 交接附件
	 * @return 当前对象
	*/
	public PersonLeaveAct setFile2Ids(String file2Ids) {
		this.file2Ids=file2Ids;
		return this;
	}
	
	/**
	 * 获得 交接人<br>
	 * 交接人
	 * @return 交接人
	*/
	public String getHandoverId() {
		return handoverId;
	}
	
	/**
	 * 设置 交接人
	 * @param handoverId 交接人
	 * @return 当前对象
	*/
	public PersonLeaveAct setHandoverId(String handoverId) {
		this.handoverId=handoverId;
		return this;
	}
	
	/**
	 * 获得 主键<br>
	 * 主键
	 * @return 主键
	*/
	public String getId() {
		return id;
	}
	
	/**
	 * 设置 主键
	 * @param id 主键
	 * @return 当前对象
	*/
	public PersonLeaveAct setId(String id) {
		this.id=id;
		return this;
	}
	
	/**
	 * 获得 离职日期<br>
	 * 离职日期
	 * @return 离职日期
	*/
	public Date getLeaveDate() {
		return leaveDate;
	}
	
	/**
	 * 设置 离职日期
	 * @param leaveDate 离职日期
	 * @return 当前对象
	*/
	public PersonLeaveAct setLeaveDate(Date leaveDate) {
		this.leaveDate=leaveDate;
		return this;
	}
	
	/**
	 * 获得 备注<br>
	 * 备注
	 * @return 备注
	*/
	public String getNote() {
		return note;
	}
	
	/**
	 * 设置 备注
	 * @param note 备注
	 * @return 当前对象
	*/
	public PersonLeaveAct setNote(String note) {
		this.note=note;
		return this;
	}
	
	/**
	 * 获得 经办时间<br>
	 * 经办时间
	 * @return 经办时间
	*/
	public Date getOperTime() {
		return operTime;
	}
	
	/**
	 * 设置 经办时间
	 * @param operTime 经办时间
	 * @return 当前对象
	*/
	public PersonLeaveAct setOperTime(Date operTime) {
		this.operTime=operTime;
		return this;
	}
	
	/**
	 * 获得 经办人<br>
	 * 经办人
	 * @return 经办人
	*/
	public String getOperUserId() {
		return operUserId;
	}
	
	/**
	 * 设置 经办人
	 * @param operUserId 经办人
	 * @return 当前对象
	*/
	public PersonLeaveAct setOperUserId(String operUserId) {
		this.operUserId=operUserId;
		return this;
	}
	
	/**
	 * 获得 离职人员<br>
	 * 离职人员
	 * @return 离职人员
	*/
	public String getPersonId() {
		return personId;
	}
	
	/**
	 * 设置 离职人员
	 * @param personId 离职人员
	 * @return 当前对象
	*/
	public PersonLeaveAct setPersonId(String personId) {
		this.personId=personId;
		return this;
	}
	
	/**
	 * 获得 办理状态<br>
	 * 办理状态
	 * @return 办理状态
	*/
	public String getStatus() {
		return status;
	}
	
	/**
	 * 设置 办理状态
	 * @param status 办理状态
	 * @return 当前对象
	*/
	public PersonLeaveAct setStatus(String status) {
		this.status=status;
		return this;
	}
	
	/**
	 * 获得 租户<br>
	 * 租户
	 * @return 租户
	*/
	public String getTenantId() {
		return tenantId;
	}
	
	/**
	 * 设置 租户
	 * @param tenantId 租户
	 * @return 当前对象
	*/
	public PersonLeaveAct setTenantId(String tenantId) {
		this.tenantId=tenantId;
		return this;
	}
	
	/**
	 * 获得 修改人ID<br>
	 * 修改人ID
	 * @return 修改人ID
	*/
	public String getUpdateBy() {
		return updateBy;
	}
	
	/**
	 * 设置 修改人ID
	 * @param updateBy 修改人ID
	 * @return 当前对象
	*/
	public PersonLeaveAct setUpdateBy(String updateBy) {
		this.updateBy=updateBy;
		return this;
	}
	
	/**
	 * 获得 修改时间<br>
	 * 修改时间
	 * @return 修改时间
	*/
	public Date getUpdateTime() {
		return updateTime;
	}
	
	/**
	 * 设置 修改时间
	 * @param updateTime 修改时间
	 * @return 当前对象
	*/
	public PersonLeaveAct setUpdateTime(Date updateTime) {
		this.updateTime=updateTime;
		return this;
	}
	
	/**
	 * 获得 version<br>
	 * version
	 * @return version
	*/
	public Integer getVersion() {
		return version;
	}
	
	/**
	 * 设置 version
	 * @param version version
	 * @return 当前对象
	*/
	public PersonLeaveAct setVersion(Integer version) {
		this.version=version;
		return this;
	}
	
	/**
	 * 获得 person<br>
	 * person
	 * @return person
	*/
	public Person getPerson() {
		return person;
	}
	
	/**
	 * 设置 person
	 * @param person person
	 * @return 当前对象
	*/
	public PersonLeaveAct setPerson(Person person) {
		this.person=person;
		return this;
	}
	
	/**
	 * 获得 handover<br>
	 * handover
	 * @return handover
	*/
	public Employee getHandover() {
		return handover;
	}
	
	/**
	 * 设置 handover
	 * @param handover handover
	 * @return 当前对象
	*/
	public PersonLeaveAct setHandover(Employee handover) {
		this.handover=handover;
		return this;
	}
	
	/**
	 * 获得 oper<br>
	 * oper
	 * @return oper
	*/
	public Employee getOper() {
		return oper;
	}
	
	/**
	 * 设置 oper
	 * @param oper oper
	 * @return 当前对象
	*/
	public PersonLeaveAct setOper(Employee oper) {
		this.oper=oper;
		return this;
	}

	/**
	 * 将自己转换成指定类型的PO
	 * @param poType  PO类型
	 * @return PersonLeaveAct , 转换好的 PersonLeaveAct 对象
	*/
	@Transient
	public <T extends Entity> T toPO(Class<T> poType) {
		return EntityContext.create(poType, this);
	}

	/**
	 * 将自己转换成任意指定类型
	 * @param pojoType  Pojo类型
	 * @return PersonLeaveAct , 转换好的 PoJo 对象
	*/
	@Transient
	public <T> T toPojo(Class<T> pojoType) {
		if(Entity.class.isAssignableFrom(pojoType)) {
			return (T)this.toPO((Class<Entity>)pojoType);
		}
		try {
			T pojo=pojoType.newInstance();
			EntityContext.copyProperties(pojo, this);
			return pojo;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public PersonLeaveAct clone() {
		return duplicate(true);
	}

	/**
	 * 复制当前对象
	 * @param all 是否复制全部属性，当 false 时，仅复制来自数据表的属性
	*/
	@Transient
	public PersonLeaveAct duplicate(boolean all) {
		com.dt.platform.domain.hr.meta.PersonLeaveActMeta.$$proxy$$ inst = new com.dt.platform.domain.hr.meta.PersonLeaveActMeta.$$proxy$$();
		inst.setNote(this.getNote());
		inst.setOperUserId(this.getOperUserId());
		inst.setUpdateTime(this.getUpdateTime());
		inst.setVersion(this.getVersion());
		inst.setContent(this.getContent());
		inst.setCreateBy(this.getCreateBy());
		inst.setHandoverId(this.getHandoverId());
		inst.setDeleted(this.getDeleted());
		inst.setCreateTime(this.getCreateTime());
		inst.setDeleteTime(this.getDeleteTime());
		inst.setUpdateBy(this.getUpdateBy());
		inst.setLeaveDate(this.getLeaveDate());
		inst.setTenantId(this.getTenantId());
		inst.setDeleteBy(this.getDeleteBy());
		inst.setFile2Ids(this.getFile2Ids());
		inst.setPersonId(this.getPersonId());
		inst.setFile1Ids(this.getFile1Ids());
		inst.setId(this.getId());
		inst.setOperTime(this.getOperTime());
		inst.setStatus(this.getStatus());
		if(all) {
			inst.setHandover(this.getHandover());
			inst.setPerson(this.getPerson());
			inst.setOper(this.getOper());
		}
		inst.clearModifies();
		return inst;
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public PersonLeaveAct clone(boolean deep) {
		return EntityContext.clone(PersonLeaveAct.class,this,deep);
	}

	/**
	 * 将 Map 转换成 PersonLeaveAct
	 * @param personLeaveActMap 包含实体信息的 Map 对象
	 * @return PersonLeaveAct , 转换好的的 PersonLeaveAct 对象
	*/
	@Transient
	public static PersonLeaveAct createFrom(Map<String,Object> personLeaveActMap) {
		if(personLeaveActMap==null) return null;
		PersonLeaveAct po = create();
		EntityContext.copyProperties(po,personLeaveActMap);
		po.clearModifies();
		return po;
	}

	/**
	 * 将 Pojo 转换成 PersonLeaveAct
	 * @param pojo 包含实体信息的 Pojo 对象
	 * @return PersonLeaveAct , 转换好的的 PersonLeaveAct 对象
	*/
	@Transient
	public static PersonLeaveAct createFrom(Object pojo) {
		if(pojo==null) return null;
		PersonLeaveAct po = create();
		EntityContext.copyProperties(po,pojo);
		po.clearModifies();
		return po;
	}

	/**
	 * 创建一个 PersonLeaveAct，等同于 new
	 * @return PersonLeaveAct 对象
	*/
	@Transient
	public static PersonLeaveAct create() {
		return new com.dt.platform.domain.hr.meta.PersonLeaveActMeta.$$proxy$$();
	}

	/**
	 * 从 Map 读取
	 * @param map 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(Map<String, Object> map,boolean cast) {
		if(map==null) return false;
		if(cast) {
			this.setNote(DataParser.parse(String.class, map.get(PersonLeaveActMeta.NOTE)));
			this.setOperUserId(DataParser.parse(String.class, map.get(PersonLeaveActMeta.OPER_USER_ID)));
			this.setUpdateTime(DataParser.parse(Date.class, map.get(PersonLeaveActMeta.UPDATE_TIME)));
			this.setVersion(DataParser.parse(Integer.class, map.get(PersonLeaveActMeta.VERSION)));
			this.setContent(DataParser.parse(String.class, map.get(PersonLeaveActMeta.CONTENT)));
			this.setCreateBy(DataParser.parse(String.class, map.get(PersonLeaveActMeta.CREATE_BY)));
			this.setHandoverId(DataParser.parse(String.class, map.get(PersonLeaveActMeta.HANDOVER_ID)));
			this.setDeleted(DataParser.parse(Integer.class, map.get(PersonLeaveActMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, map.get(PersonLeaveActMeta.CREATE_TIME)));
			this.setDeleteTime(DataParser.parse(Date.class, map.get(PersonLeaveActMeta.DELETE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, map.get(PersonLeaveActMeta.UPDATE_BY)));
			this.setLeaveDate(DataParser.parse(Date.class, map.get(PersonLeaveActMeta.LEAVE_DATE)));
			this.setTenantId(DataParser.parse(String.class, map.get(PersonLeaveActMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, map.get(PersonLeaveActMeta.DELETE_BY)));
			this.setFile2Ids(DataParser.parse(String.class, map.get(PersonLeaveActMeta.FILE2_IDS)));
			this.setPersonId(DataParser.parse(String.class, map.get(PersonLeaveActMeta.PERSON_ID)));
			this.setFile1Ids(DataParser.parse(String.class, map.get(PersonLeaveActMeta.FILE1_IDS)));
			this.setId(DataParser.parse(String.class, map.get(PersonLeaveActMeta.ID)));
			this.setOperTime(DataParser.parse(Date.class, map.get(PersonLeaveActMeta.OPER_TIME)));
			this.setStatus(DataParser.parse(String.class, map.get(PersonLeaveActMeta.STATUS)));
			// others
			this.setHandover(DataParser.parse(Employee.class, map.get(PersonLeaveActMeta.HANDOVER)));
			this.setPerson(DataParser.parse(Person.class, map.get(PersonLeaveActMeta.PERSON)));
			this.setOper(DataParser.parse(Employee.class, map.get(PersonLeaveActMeta.OPER)));
			return true;
		} else {
			try {
				this.setNote( (String)map.get(PersonLeaveActMeta.NOTE));
				this.setOperUserId( (String)map.get(PersonLeaveActMeta.OPER_USER_ID));
				this.setUpdateTime( (Date)map.get(PersonLeaveActMeta.UPDATE_TIME));
				this.setVersion( (Integer)map.get(PersonLeaveActMeta.VERSION));
				this.setContent( (String)map.get(PersonLeaveActMeta.CONTENT));
				this.setCreateBy( (String)map.get(PersonLeaveActMeta.CREATE_BY));
				this.setHandoverId( (String)map.get(PersonLeaveActMeta.HANDOVER_ID));
				this.setDeleted( (Integer)map.get(PersonLeaveActMeta.DELETED));
				this.setCreateTime( (Date)map.get(PersonLeaveActMeta.CREATE_TIME));
				this.setDeleteTime( (Date)map.get(PersonLeaveActMeta.DELETE_TIME));
				this.setUpdateBy( (String)map.get(PersonLeaveActMeta.UPDATE_BY));
				this.setLeaveDate( (Date)map.get(PersonLeaveActMeta.LEAVE_DATE));
				this.setTenantId( (String)map.get(PersonLeaveActMeta.TENANT_ID));
				this.setDeleteBy( (String)map.get(PersonLeaveActMeta.DELETE_BY));
				this.setFile2Ids( (String)map.get(PersonLeaveActMeta.FILE2_IDS));
				this.setPersonId( (String)map.get(PersonLeaveActMeta.PERSON_ID));
				this.setFile1Ids( (String)map.get(PersonLeaveActMeta.FILE1_IDS));
				this.setId( (String)map.get(PersonLeaveActMeta.ID));
				this.setOperTime( (Date)map.get(PersonLeaveActMeta.OPER_TIME));
				this.setStatus( (String)map.get(PersonLeaveActMeta.STATUS));
				// others
				this.setHandover( (Employee)map.get(PersonLeaveActMeta.HANDOVER));
				this.setPerson( (Person)map.get(PersonLeaveActMeta.PERSON));
				this.setOper( (Employee)map.get(PersonLeaveActMeta.OPER));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}

	/**
	 * 从 Map 读取
	 * @param r 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(ExprRcd r,boolean cast) {
		if(r==null) return false;
		if(cast) {
			this.setNote(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.NOTE)));
			this.setOperUserId(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.OPER_USER_ID)));
			this.setUpdateTime(DataParser.parse(Date.class, r.getValue(PersonLeaveActMeta.UPDATE_TIME)));
			this.setVersion(DataParser.parse(Integer.class, r.getValue(PersonLeaveActMeta.VERSION)));
			this.setContent(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.CONTENT)));
			this.setCreateBy(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.CREATE_BY)));
			this.setHandoverId(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.HANDOVER_ID)));
			this.setDeleted(DataParser.parse(Integer.class, r.getValue(PersonLeaveActMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, r.getValue(PersonLeaveActMeta.CREATE_TIME)));
			this.setDeleteTime(DataParser.parse(Date.class, r.getValue(PersonLeaveActMeta.DELETE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.UPDATE_BY)));
			this.setLeaveDate(DataParser.parse(Date.class, r.getValue(PersonLeaveActMeta.LEAVE_DATE)));
			this.setTenantId(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.DELETE_BY)));
			this.setFile2Ids(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.FILE2_IDS)));
			this.setPersonId(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.PERSON_ID)));
			this.setFile1Ids(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.FILE1_IDS)));
			this.setId(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.ID)));
			this.setOperTime(DataParser.parse(Date.class, r.getValue(PersonLeaveActMeta.OPER_TIME)));
			this.setStatus(DataParser.parse(String.class, r.getValue(PersonLeaveActMeta.STATUS)));
			return true;
		} else {
			try {
				this.setNote( (String)r.getValue(PersonLeaveActMeta.NOTE));
				this.setOperUserId( (String)r.getValue(PersonLeaveActMeta.OPER_USER_ID));
				this.setUpdateTime( (Date)r.getValue(PersonLeaveActMeta.UPDATE_TIME));
				this.setVersion( (Integer)r.getValue(PersonLeaveActMeta.VERSION));
				this.setContent( (String)r.getValue(PersonLeaveActMeta.CONTENT));
				this.setCreateBy( (String)r.getValue(PersonLeaveActMeta.CREATE_BY));
				this.setHandoverId( (String)r.getValue(PersonLeaveActMeta.HANDOVER_ID));
				this.setDeleted( (Integer)r.getValue(PersonLeaveActMeta.DELETED));
				this.setCreateTime( (Date)r.getValue(PersonLeaveActMeta.CREATE_TIME));
				this.setDeleteTime( (Date)r.getValue(PersonLeaveActMeta.DELETE_TIME));
				this.setUpdateBy( (String)r.getValue(PersonLeaveActMeta.UPDATE_BY));
				this.setLeaveDate( (Date)r.getValue(PersonLeaveActMeta.LEAVE_DATE));
				this.setTenantId( (String)r.getValue(PersonLeaveActMeta.TENANT_ID));
				this.setDeleteBy( (String)r.getValue(PersonLeaveActMeta.DELETE_BY));
				this.setFile2Ids( (String)r.getValue(PersonLeaveActMeta.FILE2_IDS));
				this.setPersonId( (String)r.getValue(PersonLeaveActMeta.PERSON_ID));
				this.setFile1Ids( (String)r.getValue(PersonLeaveActMeta.FILE1_IDS));
				this.setId( (String)r.getValue(PersonLeaveActMeta.ID));
				this.setOperTime( (Date)r.getValue(PersonLeaveActMeta.OPER_TIME));
				this.setStatus( (String)r.getValue(PersonLeaveActMeta.STATUS));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}
}